<!DOCTYPE html>
<!-- saved from url=(0099)http://file.museum.chaoxing.com/3d/standard/?museumCode=fuliang&from=singlemessage&isappinstalled=0 -->
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

    <meta name="viewport"
          content="width=device-width, initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>文物展示平台</title>
    <link rel="stylesheet" href="./css/reset.css">
    <link rel="stylesheet" href="./css/style2.css">
    <script src="./js/jquery-3.1.1.min.js"></script>
    <script src="./js/cookie.js"></script>
    <script>
      let museumCode = getQueryStringRegExp('museumCode');
      setCookie('museumCode', museumCode)
    </script>
</head>

<body>
<div class="logo"><img src="./img/logo.png" alt=""></div>
<div class="allExhibits">
    <button onclick="window.location.href='./list.html'" class="all-button">全部文物</button>
    <!--    <img src="./img/BigTitle.png" alt="">-->
</div>
<div class="cont3d">
    <ul id="cont3d" style="position: relative; overflow: hidden; top: -4352px;">
        <li class=" clearfix cont3dlist">
            <!--            <div class="Item3d" onclick="window.location.href='./des.html?id=584534752'">-->
            <!--                <div class="item scale1"><img src="./img/222.png" alt="花果纹高足盘"><span-->
            <!--                        style="color:#C5C2C2">龙虎纹瓶</span></div>-->
            <!--            </div>-->
            <!--            <div class="Item3d" onclick="window.location.href='./des.html?id=652649176'">-->
            <!--                <div class="item scale2"><img src="./img/1.png" alt="孔明灯"><span-->
            <!--                        style="color:#C5C2C2">女塑像</span></div>-->
            <!--            </div>-->
            <!--            <div class="Item3d" onclick="window.location.href='./des.html?id=868425336'">-->
            <!--                <div class="item scale3"><img src="./img/11574832026312.png" alt="象耳瓶"><span-->
            <!--                        style="color:#C5C2C2">高足碟</span></div>-->
            <!--            </div>-->
            <!--            <div class="Item3d" onclick="window.location.href='./des.html?id=96222919'">-->
            <!--                <div class="item scale4"><img src="./img/11.png" alt="陶俑"><span-->
            <!--                        style="color:#C5C2C2">花果纹高足盘</span></div>-->
            <!--            </div>-->
            <!--            <div class="Item3d" onclick="window.location.href='./des.html?id=107581331'">-->
            <!--                <div class="item scale5"><img src="./img/111.png" alt="天球瓶"><span-->
            <!--                        style="color:#C5C2C2">孔明灯</span></div>-->
            <!--            </div>-->
            <!--            <div class="Item3d" onclick="window.location.href='./des.html?id=310937303'">-->
            <!--                <div class="item scale6"><img src="./img/4.png" alt="绿龙盘"><span-->
            <!--                        style="color:#C5C2C2">象耳瓶</span></div>-->
            <!--            </div>-->
            <!--            <div class="Item3d" onclick="window.location.href='./des.html?id=489455592'">-->
            <!--                <div class="item scale2"><img src="./img/31574831081905.png" alt="女塑像"><span-->
            <!--                        style="color:#C5C2C2">天球瓶</span></div>-->
            <!--            </div>-->
            <!--            <div class="Item3d" onclick="window.location.href='./des.html?id=489677216'">-->
            <!--                <div class="item scale3"><img src="./img/1111111.png" alt="高足碟"><span-->
            <!--                        style="color:#C5C2C2">绿龙盘</span></div>-->
            <!--            </div>-->
            <!--            <div class="Item3d" onclick="window.location.href='./des.html?id=504943946'">-->
            <!--                <div class="item scale4"><img src="./img/1111.png" alt="花果纹高足盘"><span style="color:#C5C2C2">菱形高足碟</span>-->
            <!--                </div>-->
            <!--            </div>-->
        </li>
    </ul>
</div>
<script src="./js/seamscroll.js"></script>
<script src="./js/desData.js"></script>
<script>
  $(function () {
    $.ajax({
      url: '/api/museum/exhibit/listIndex',
      method: 'post',
      data: {},
      success: function (res) {
        console.log(res)
        let i = 0;
        for (const exhibit of res) {
          i++;
          if (i === 7) {
            i = 1;
          }
          let div = '<div class="Item3d" onclick="window.location.href=\'./detail.html?id=' + exhibit.id + '\'">\n' +
            '                <div class="item scale'+i+'"><img src="' + exhibit.img + '" alt="' + exhibit.name + '"><span class="home-exhibit-name" style="color:#C5C2C2">' + exhibit.name + '</span>\n' +
            '                </div>\n' +
            '            </div>'
          $('.cont3dlist').append(div)
        }
        num = $('.cont3dlist:nth-child(1) .Item3d').length;
        console.log(`num:${num}`)
      }
    })
  })

  seamscroll.init({
    dom: document.getElementById('cont3d'),
    hoverStop: false,
    step: 0.5
  })
  // 数据加载（标签）
  getColumn(1, 100);

  // 调整大小
  let item3dLength = $(' .cont3d .Item3d').length;

  // <!-- 随机缩放替换 -->

  function getRandomInt(min, max) {
    return Math.floor(Math.random() * (max - min + 1)) + min;
  }


  let random = 1;
  setInterval('startRequest()', 2000);

  function startRequest() {
    $('.cont3dlist .Item3d .item ').removeClass('tobigsm');
    $('.cont3dlist .Item3d:nth-child(' + random + ') .item ').addClass('tobigsm');
    let randomnext = random + 1;
    if ((randomnext) > num) {
      randomnext = 1;
    }
    let time = setTimeout(function () {
      const $span = $('.cont3dlist .Item3d:nth-child(' + random + ') .item  span')
      const $nextSpan = $('.cont3dlist .Item3d:nth-child(' + randomnext + ') .item  span')
      $('.cont3dlist .Item3d:nth-child(' + random + ') ').attr({"onclick": $('.cont3dlist .Item3d:nth-child(' + randomnext + ')').attr("onclick")});
      $('.cont3dlist .Item3d:nth-child(' + random + ') .item  img').attr({"src": $('.cont3dlist .Item3d:nth-child(' + randomnext + ') .item  img').attr("src")});
      $('.cont3dlist .Item3d:nth-child(' + random + ') .item  alt').attr({"src": $('.cont3dlist .Item3d:nth-child(' + randomnext + ') .item  alt').attr("src")});
      $span.html($nextSpan.html());
      $span.css('color', $nextSpan.css("color"))
      if (random === num) {
        random = 1
      } else {
        random = random + 1;
      }
    }, 1000);
  }
</script>


</body>
</html>